﻿<!DCOTYPE  html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>业务线搜索词数据下载</title>
        <link rel="stylesheet" href="/css/theme/font-awesome.min.css" type="text/css" />
        <link rel="stylesheet" href="/css/theme/bootstrap.min.css" type="text/css" />
        <link rel="stylesheet" href="/javascript/theme/libs/jquery-easyui-1.4/themes/default/easyui.css" type="text/css" />
        <link rel="stylesheet" href="/css/theme/App.css" type="text/css" />
        <link rel="stylesheet" href="/css/theme/custom.css" type="text/css" />
        <script src="/javascript/theme/libs/jquery-1.9.1.min.js"></script>
        <script src="/javascript/theme/libs/jquery-easyui-1.4/jquery.easyui.min.js"></script>
        <script src="/javascript/theme/libs/bootstrap.min.js"></script>
        <script src="/javascript/theme/App.js"></script>
        <script type="text/javascript" src="/javascript/My97DatePicker/WdatePicker.js"></script>
        <script type="text/javascript" src="/javascript/report/FusionCharts.js"></script>
        <style type="text/css">
            .alink {
            text-decoration:underline;
            color:#0000CC;
            }
            .alinkClicked {
            color:#0000CC;
            }
            #cates,#locals,#cateClean,#localClean{
            display:none;
            }
			div{background:white;}
        </style>
    </head>
    <body>
        <div id="content" style="OVERFLOW-X:yes;OVERFLOW-Y:auto;">
            <div id="content-container">
                <form action="/datareport/skwdata" class="form-horizontal" name="searchform" role="form" method="post">
                    <div class="portlet">
                        <div class="portlet-header">
                            <h3>
                                <i class="fa fa-tasks"></i>
                              业务线搜索词查询
                            </h3>
                        </div>
                        <!-- /.portlet-header -->
                        <div class="portlet-content">
</br>
<div class="form-group">
      <label class="col-md-2">&nbsp;&nbsp;日 期 : </label>
      <div class="col-md-2">
          <input  type="text" name="startdate" id="startdate" value="$!{startdate}" style="width:120px;height:25px" class="Wdate form-control" value="$!{sendTime}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'%y-%M-#{%d-1}'})"/>
      </div>

  	<label class="col-md-2">&nbsp;&nbsp;城市: </label>
  	<div class="col-md-2">
    		<input type="hidden" id="initalcity" value="$!filecity" />
    		<select  id="filecity" name="filecity" value="$!{filecity}" style="width:130px;height:25px">
    				#foreach( $city in $cityList)
    					<option value="$!{city}"  #if($!{city} == $!{filecity}) selected #end>$!{city}</option>
    				#end
    		</select>
  	 </div>

    <label class="col-md-2">&nbsp;&nbsp;平台: </label>
   <div class="col-md-2">
        <input type="radio" name="platform" value="pc" #if($!{platform}=='pc') checked #end  />PC&nbsp;&nbsp;&nbsp;
        <input type="radio" name="platform" value="m" #if($!{platform}=='m') checked #end /> M &nbsp;&nbsp;&nbsp;
    </div>


	 </br></br>
	<label class="col-md-2">&nbsp;&nbsp;业务线: </label>
	<div class="col-md-2">
		<input type="hidden" id="alltype" value="$!product" />
				<select class="easyui-combobox" name="product" id="product" value="$!{product}" data-options="valueField: 'value',textField: 'value'" style="width:130px;height:25px">
    				#foreach( $type in $dpCateList)
					<option value="$!{type}"  #if($!{type} == $!{product}) selected #end>$!{type}</option>
				#end
					</select>
	</div>
    <label class="col-md-2">&nbsp;&nbsp;一级类别: </label>
	<div class="col-md-2">
		<input type="hidden" id="onetype" value="$!dpCateOne" />
		<select class="easyui-combobox"  id="dpCateOne" name="dpCateOne" value="$!{dpCateOne}" data-options="valueField: 'value',textField: 'value'" style="width:130px;height:25px">
				#foreach( $dpChannelName in $dpCateOneList)
					<option value="$!{dpChannelName}"  #if($!{dpChannelName} == $!{dpCateOne}) selected #end>$!{dpChannelName}</option>
				#end
		</select>
	 </div>
	<label class="col-md-2">&nbsp;&nbsp;二级类别: </label>
	<div class="col-md-2">
		<input type="hidden" id="twotype" value="$!dpCateTwo" />
		<select class="easyui-combobox"  id="dpCateTwo" name="dpCateTwo" value="$!{dpCateTwo}" data-options="valueField: 'value',textField: 'value'" style="width:130px;height:25px">
			#foreach( $dpChannel2Name in $dpCateTwoList)
					<option value="$!{dpChannel2Name}"  #if($!{dpChannel2Name} == $!{dpCateTwo}) selected #end>$!{dpChannel2Name}</option>
				#end	
		</select>
	 </div>
	 &nbsp;&nbsp;&nbsp;&nbsp;
	 <textarea style="width:100px;height:20px"  hidden="hidden"  name="typename" id="typename" value="$!{typename}" >$!{selecttype}</textarea>
    <input type="submit" class="btn btn-primary btn-xs" value="查询" />
</div>
</div>
</div>
<div class="portlet">
    
    					
							<div class="portlet-header">
    
    							<h3>
    								<i class="fa fa-hand-o-up"></i>
    								查询结果
    							</h3>
    
    						</div> <!-- /.portlet-header -->				
    						<div class="portlet-content">						
    							<div class="table-responsive">
    
									<!--table begin -->
        							<table class="table table-striped table-bordered table-hover" id="wordtable" data-provide="datatable" data-display-rows="20" >
        									<thead>
        										<tr>
													<th  style="text-align:center;"  width="11%">排名</th>
													<th  style="text-align:center;" width="24%">搜索词</th>
													<th  style="text-align:center;" width="11%">搜索频率</th>
													<th  style="text-align:center;" width="8%"></th>
													<th  style="text-align:center;"  width="11%">排名</th>
													<th  style="text-align:center;" width="24%">搜索词</th>
													<th  style="text-align:center;" width="11%">搜索频率</th>
        										</tr>
        									</thead>
        									<tbody>
												 #foreach($rs in $rsList)
                                            		<tr  align="center" >
                                            		   <td style="color:red;">$!rs.rank</td>
                                                       <td>$!rs.word</td>
                                                       <td style="color:green;">$!rs.wordCount</td>
                                                       <td></td>
                                                       <td style="color:red;">$!rs.rank2</td>
                                               		   <td>$!rs.word2</td>
                                                       <td style="color:green;">$!rs.wordCount2</td>
                                                    </tr>	
                                        		#end
												
        									</tbody>
        								
        							</table>
        							<!--table end -->
										
    								<!--paginate begin -->
									#if($rsList.size())
    								<div align="right">
										<button type="button" id="download" name="download" onclick="downword()" class="btn btn-primary btn-xs">
													导出EXCEL
										</button>
									<!--	<a style="color:green" href="">下载</a> &nbsp --> 
                                    </div>
									#end
    								<!--paginate end -->
    								
									
                                </div>
							</div> <!-- /#portlet-content -->			 						
    						</div> 
<script >
$(function(){
               $("#filecity").combobox({
               		selectOnNavigation: true,
               		onSelect: function(newVal,oldVal){
               			var city = $("#filecity").combobox('getValue');
               			
               		}
               });
               $("#filecity").combobox('setValue',$('#initalcity').val());
});
$(function(){
               $("#product").combobox({
               		selectOnNavigation: true,
               		onSelect: function(newVal,oldVal){
               			var type = $("#product").combobox('getValue');
               			var url ="/irtools/getCate2?Cate1="+"&ChannelName="+type;
						 $("#dpCateOne").combobox('setValue',"全部");
						 $("#dpCateTwo").combobox('setValue',"全部");
			             $("#dpCateOne").combobox('reload',url);
						var url2="/irtools/getCate2?Cate1=全部"+"&ChannelName="+type;
						 $("#dpCateTwo").combobox('reload',url2);
               		}
               });
               $("#product").combobox('setValue',$('#alltype').val());
			   $("#dpCateOne").combobox('setValue',$('#onetype').val());
			   $("#dpCateTwo").combobox('setValue',$('#twotype').val());
});
$(function(){
               $("#dpCateOne").combobox({
               		selectOnNavigation: true,
               		onSelect: function(newVal,oldVal){
               			var dpChannelName = $("#dpCateOne").combobox('getValue');
						var channelname=$("#product").combobox('getValue');
						var url ="/irtools/getCate2?Cate1="+dpChannelName+"&ChannelName="+channelname;
			            $("#dpCateTwo").combobox('setValue',"全部");
						$("#dpCateTwo").combobox('reload',url);
						
						}
						 });
				
               $("#dpCateOne").combobox('setValue',$('#onetype').val());
			   $("#dpCateTwo").combobox('setValue',$('#twotype').val());
});

function downword(){

   document.getElementById('typename').value="excel";
   searchform.submit();
   document.getElementById('typename').value="";
  
}

</script>
</body>
</html>
